package com.kyzh.core.adapters

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import com.gushenge.core.beans.IndexTop
import com.gushenge.core.beans.Task

class GameDetailAdapter(manager:FragmentManager,val beans:ArrayList<Fragment>,val titles:ArrayList<IndexTop>):FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
    override fun getItem(position: Int): Fragment {
        return beans[position]
    }

    override fun getCount(): Int {
        return beans.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return titles[position].name
    }
}